define(function(require,exports,module){
	/*
		盘中直播模块
	 */

	var publicMethod = require('../../public/public');

	var template = require('../template/template');

	var intraday = {
		init:function(){ //初始化
			var self = this;

			//开盘统计
			self.kpStatistics();

		},
		kpStatistics:function(){ //开盘统计
			
			//template.kpStatistics();//渲染开盘统计


			
			//$.support.cors = true;
			
			var url = 'http://zx.10jqka.com.cn/i/exammarket/getopeningclosindata';
			publicMethod.ajaxJsonp({
				url:url,
				type:'get',
				data:{'returntype':'jsonp'},
				jsonpCallback:'callback',
				callback:function(result){
					if(result['error_code'] === 0){
						template.kpStatistics(result['result']);//渲染开盘统计	
					}
				}
			});
		}

	};

	module.exports = intraday;
});